/**
* Copyright (c) By zengqh.
*
* This program is just for fun or demo, in the hope that it  
* will be useful, you can redistribute it and/or modify freely.
*
* Time: 2012/07/25
* File: OGLRenderTT.h
* Blog: http://www.cnblogs.com/zengqh/
**/

#ifndef OGLRenderTT_h__
#define OGLRenderTT_h__

#include "../RenderTT.h"
#include "OGLFrameBuffer.h"
#include "OGLFBOTexture2D.h"
#include "OGLDepthStencilRenderTarget.h"

class OGLRenderTT : public RenderTT
{
public:
	OGLRenderTT(const Dimension2Di& size);
	~OGLRenderTT();

	void bind();
	void unbind();

	Texture* getTexture() const;

protected:
	void setup();

protected:
	OGLFrameBuffer*					_fb;
	OGLFBOTexture2D*				_texture;
	OGLDepthStencilRenderTarget*	_depth_stencil_rt;
};

#endif    /* OGLRenderTT_h__ */